﻿/*******************************************************************************
 * AAEngine
 * Copyright (c) 2010 Mike Jarosch
 *
 * Original source PushButton Engine:
 * Copyright (C) 2009 PushButton Labs, LLC
 * For more information see http://www.pushbuttonengine.com
 *
 * This file is licensed under the terms of the MIT license, which is included
 * in the "MIT License.txt" file at the root directory of this SDK.
 ******************************************************************************/

namespace AAEngine.Sound
{
    /// <summary>
    /// A reference to an actively playing sound. Use ISoundManager.play() to
    /// create these. You can pause/resume/stop the sound, as well as adjust its
    /// volume and pan.
    /// </summary>
    public interface ISoundHandle
    {
        /// <summary>
        /// Pause playback; can continue it with resume().
        /// </summary>
        void Pause();

        /// <summary>
        /// Resume playback paused with pause().
        /// </summary>
        void Resume();

        /// <summary>
        /// Irrevocably stop playback. The sound is removed from the SoundManager,
        /// and related resources are released.
        /// </summary>
        void Stop();

        /// <summary>
        /// Adjust the sound's volume.
        /// </summary>
        float Volume { get; set; }

        /// <summary>
        /// Adjust the panning (-1 is left, 1 is right) for the sound.
        /// </summary>
        float Pan { get; set; }

        /// <summary>
        /// Under what category is the sound being tracked by the SoundManager?
        /// </summary>
        string Category { get; }

        /// <summary>
        /// Returns whether or not this sound is currently playing
        /// </summary>
        bool IsPlaying { get; }
    }
}
